// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MeshToOBJExporterActor.generated.h"

UCLASS()
class MYSCENE_API AMeshToOBJExporterActor : public AActor
{
	GENERATED_BODY()

public:
	// Sets default values for this actor's properties
	AMeshToOBJExporterActor();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	//public:
	//    // 导出静态Mesh为OBJ文件
	//    UFUNCTION(BlueprintCallable, Category = "Mesh Export")
	//    bool ExportStaticMeshToOBJ(UStaticMesh* StaticMesh, const FString& OutputPath, bool bExportMaterial = false);
	//
	//    // 导出当前场景中所有静态MeshActor为OBJ文件
	//    UFUNCTION(BlueprintCallable, Category = "Mesh Export")
	//    bool ExportAllStaticMeshesInLevel(const FString& OutputDirectory);
	//
	//private:
	//    // 获取Mesh的顶点数据
	//    void GetMeshData(UStaticMesh* StaticMesh, TArray<FVector>& OutVertices, TArray<FVector>& OutNormals,
	//        TArray<FVector2D>& OutUVs, TArray<FProcMeshTangent>& OutTangents, TArray<int32>& OutTriangles);
	//
	//    // 写入OBJ文件
	//    bool WriteOBJFile(const FString& Filename, const TArray<FVector>& Vertices, const TArray<FVector>& Normals,
	//        const TArray<FVector2D>& UVs, const TArray<int32>& Triangles, const FString& MaterialName = "");
};


